package edu.hunau.dao.impl;

import edu.hunau.dao.UserDao;
import edu.hunau.pojo.User;
import org.springframework.stereotype.Repository;

/**
 * @author hb
 * @date 2023-04-14 11:32:41
 */
@Repository
public class UserDaoImpl implements UserDao {
    @Override
    public User queryByUsernameAndPassword(String username, String password) {
        System.out.println("\tUserDao#login(String,String) do...");
        return new User("haoren","123456");
    }

    @Override
    public void insert(User user) {
        System.out.println("\tUserDao#regist(User) do...");
    }

    @Override
    public User queryByUserName(String username) {
        System.out.println("\tUserDao#queryByUserName(String) do...");
        if("haoren".equals(username)){
            return new User();
        }
        return null;
    }
}
